<head>
    <meta charset="UTF-8">
<title>算法提高 班级排名</title>
<link rel="stylesheet" href="../css/main.css">
</head>
 <p>&nbsp;<span class="Apple-style-span" style="font-family: 宋体; ">【问题描述】</span></p>
<p class="MsoNormal" style="text-indent:21.75pt"><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">达达在陶陶的影响下，也对学习慢慢的产生了兴趣。</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:21.75pt"><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">他在每次考试之后，都会追着老师问，自己在班级的总名次是多少。考试一多，老师也不耐烦了，于是他给了达达所有人的成绩，让他自己去算出自己的排名。</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:21.75pt"><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">可人太多了，达达也无法立即算出来，于是他想让你帮帮他。</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">【输入格式】</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">第一行为一个整数</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">N</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">，代表班级的学生总数。</span><span lang="EN-US" style="mso-bidi-font-size:
10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">接下来</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">N</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">行，每行一个字符串，代表一个学生的姓名，第一行总是</span>DaDa<span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">。</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">接下来一行一个整数</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">M</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">，代表一共有</span><span lang="EN-US" style="mso-bidi-font-size:
10.5pt">M</span><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">次考试。</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">每次考试有</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">N</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">行，每行有以一个空格分隔的一个正整数</span><span lang="EN-US" style="mso-bidi-font-size:
10.5pt">S</span><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">和一个字符串</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">P</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">，代表名字为</span><span lang="EN-US" style="mso-bidi-font-size:
10.5pt">P</span><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">的学生在这次考试中得了</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">S</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">分。</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">【输出格式】</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><font class="Apple-style-span" face="宋体"><br />
</font><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">一共</span><span lang="EN-US" style="mso-bidi-font-size:10.5pt">M</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">行，每行一个整数，代表达达在班级里的排名，排名是这一次考试过后的所有考试总分排名，如果达达和别人并列，达达总是排在前面。</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体;
mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;">【样例输入</span><span style="mso-bidi-font-size:
10.5pt;font-family:宋体;mso-ascii-font-family:&quot;Times New Roman&quot;;mso-hansi-font-family:
&quot;Times New Roman&quot;">】</span></p>
<p class="MsoNormal">&nbsp;<span class="Apple-style-span" style="font-family: 'Courier New'; white-space: pre; ">3</span></p>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">DaDa<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">A<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">B<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">2<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">49 DaDa<o:p></o:p></span></pre>
<pre><st1:chmetcnv tcsc="0" numbertype="1" negative="False" hasspace="True" sourcevalue="49" unitname="a" w:st="on"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">49 A</span></st1:chmetcnv><span lang="EN-US" style="font-family:&quot;Courier New&quot;"><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">48 B<o:p></o:p></span></pre>
<pre><st1:chmetcnv tcsc="0" numbertype="1" negative="False" hasspace="True" sourcevalue="80" unitname="a" w:st="on"><span lang="EN-US" style="font-family:&quot;Courier New&quot;">80 A</span></st1:chmetcnv><span lang="EN-US" style="font-family:&quot;Courier New&quot;"><o:p></o:p></span></pre>
<pre><span lang="EN-US" style="font-family:&quot;Courier New&quot;">85 B<o:p></o:p></span></pre>
<p><span lang="EN-US" style="font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA">83 DaDa</span></p>
<pre><span class="Apple-style-span" style="font-family: 'Courier New'; "> </span><span class="Apple-style-span" style="font-family: 'Courier New'; "><br type="_moz" /></span>【样例输出】

1
2</pre>
<p>&nbsp;</p>
<p>&nbsp;【数据范围】</p>
<p>N &lt;= 100，名字长度不超过30，分数不超过100</p>
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size:10.5pt"><o:p></o:p></span></p>